home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Wonky Flux Batch 2019 02
/
Wonky_Flux_Batch_2019-02.zip
/
Wonky Flux Batch 2019-02
/
106 - Proboard KEY Floppy - Must be in Drive 1.dsk
/
STAR.TREK.PRO5
/
STAR.TREK.S
< prev
Wrap
Text File
|
1989-08-03
|
6KB
|
213 lines
; STAR TREK by Ken Rogers
; Tested and supported on ProBOARD @ 805-239-4292
; Version 1.5
public computer
public torpedos
public shields
public show.file
Shields
on nocar goto termin
if nibble(16)<4 print " shield control inoperative":linkdx$+"star","begin"
print" energy available: "e+s" units."
input" number of units to deploy to shields ";x
if x<0 or s=x then print "< shields unchanged >":linkdx$+"star","begin"
if x<=e+s goto shie2
print"shield control reports: this is not the federation treasury."
print" < shields unchanged >":linkdx$+"star","begin"
Shie2
e=e+s-x:s=x:print" deflector room control report:"
print" shields now at "s" units per your command."
linkdx$+"star","begin"
Torpedos
on nocar goto termin
if p<=0 print" all photon torpedoes expended":linkdx$+"star","begin"
if nibble(14)<4 print"photon torpedo tubes are not operational":link dx$+"star","begin"
fr$="tor":input@2"photon torpedo course (0-359): ";b1
if b1=chr$(13) linkdx$+"star","begin"
if b1=360 b1=0
if b1>=0 and b1<360 goto torp2
print "ensign chekhov reports, `incorrect course data, sir!`"
link dx$+"star","begin"
Torp2
if (b1>=0) and (b1<=90) x2=b1*10/9:x1=b1*10/9-100
if (b1>90) and (b1<=180) x2= 100-(b1*10-900)/9: x1=(b1*10-900)/9
if (b1>180) and (b1<=270) x2= 200-b1*10/9: x1= 100-(b1*10-1800)/9
if (b1>270) and (b1<360) x2= (b1*10-2700)/9-100:x1=300-b1*10/9
x=s1:y=s2:e=e-2:p=p-1:y1=0:y2=0:print"tracking torpedo;":print" ";
Torp3
y1=y1+x1:x3=(y1+x*100)/100
y2=y2+x2:y3=(y2+y*100)/100
if (x3<1) or (x3>8) goto missed
if (y3<1) or (y3>8) goto missed
gosub backup:print" ["y3","x3"]";:a$=" ":z2=y3:z1=x3:gosub cstring
if z3<>0 goto torp3
a$="<*>":z1=x3:z2=y3:gosub cstring:if z3=1 goto torp3
a$="+K+":z1=x3:z2=y3:gosub cstring:if z3=0 goto hit.star
print\"**** klingon destroyed ****":kg=kg-1:kt=kt-1
if kt<=0 link dx$+"star.main","congrats"
for i= 1to3:if x3=nibble(0+i) and y3=nibble(3+i) goto torp4
next:i=3
Torp4
i=3:next:nibble(6+i)=0:goto gone
Hit.star
a$=" * ":z1=x3:z2=y3:gosub cstring:if z3=0 goto hit.base
print\"star at "y3","x3" absorbed torpedo.":linkdx$+"star.main","shoot"
Hit.base
a$=">!<":z1=x3:z2=y3:gosub cstring:if z3=0 goto torpedos
print\"**** star base destroyed!!! ****":b3=b3-1:b9=b9-1
if b9>0 goto consider
print"that does it, captain!! You are hereby relieved of command"
print" and sentenced to 99 stardates at hard labor on cygnus 12!!"
link dx$+"star.main","end.game"
Consider
print"starfleet command reviewing your record to consider court martial"
Gone
z1=x3:z2=y3:a$=" ":gosub astring
byte((8*q1-8)+q2)=kg*100+b3*10+s3
in=((8*q1-8)+q2):a$=str$(byte(in)+1000):a$=right$(a$,3)
s8=(q2*3-2)+(q1*24-24)
if s8=1 tr$=a$+right$(tr$,189):goto torp6
if s8>=190 tr$=left$(tr$,189)+a$:goto torp6
tr$=left$(tr$,s8-1)+a$+right$(tr$,190-s8)
Torp6
linkdx$+"star.main","shoot"
Missed
print\" torpedo missed":linkdx$+"star.main","shoot"
Astring
s8=(z2*3-2)+(z1*24-24)
if s8=1 q$=a$+right$(q$,189):return
if s8>=190 q$=left$(q$,189)+a$:return
q$=left$(q$,s8-1)+a$+right$(q$,190-s8):return
Cstring
s8=((z2*3-2)+(z1*24-24)):z3=0
if mid$(q$,s8,3)<>a$ return
z3=1:return
Backup
print chr$(8,7);chr$(32,7);chr$(8,7);
return
Computer
on nocar goto termin
if nibble(17)<3 print\"Computer Disabled":linkdx$+"star","begin"
input@2\"Computer Active And Waiting Command ";j$
a=val(j$)
if j$="1" goto direction
if j$="2" goto gal.map
if j$="3" goto status
if j$="4" goto chart
if (j$="5" or j$="") link dx$+"star","begin"
print\\"functions available from library-computer"
print\'
1 - direction calculator
2 - cumulative galactic record
3 - status report
4 - chart of quadrant names
5 - exit computer'
goto computer
Direction
print\" direction calculator"
print\"you are in quadrant "q2","q1" sector "s2","s1
print"enter the sector of the object you wish to find (x,y)"
input"x=";i
if i<1 or i>8 goto direction
input"y=";w1
if w1<1 or w1>8 goto direction
b6=s1:a=s2
x=i-a:y=b6-w1:ifx<0 goto direc4
if y<0 goto direc5
if x>0 goto direc1
if y=0 b1=270:goto direc2
Direc1
b1=90
Direc2
if y<=0 y=w1-b6
if x<=0 x=a-i
if y<=x goto direc3
print\"direction = ";:i=y-x:i=(i+y)*100:i=i/y:i=(i*45)/100:printb1-i
goto computer
Direc3
print\"direction = ";:i=(((y*100)/x)*45)/100
print b1-i:goto computer
Direc4
if y>0 b1=360:print"b1="b1:goto direc6
if x<>0 b1=270:print"b1="b1:goto direc2
Direc5
b1=180
Direc6
if y<=0 y=w1-b6
if x<=0 x=a-i
if y>=x goto direc7
print\"direction = ";:i=x-y:i=(i+x)*100:i=i/x:i=(i*45)/100:print b1-i
goto computer
Direc7
print\"direction = ";:i=(((x*100)/y)*45)/100
print b1-i:goto computer
Gal.map
print\\" computer record of galaxy"\
print" 1 2 3 4 5 6 7 8
o1$=" ----- ----- ----- ----- ----- ----- ----- -----":print o1$
for i=1 to 8:print" ";:forj=1to8:print mid$(tr$,(i*24-24)+(j*3-2),3)" ";
next:print\o1$:next:goto computer
Chart
f$=dx$+"star.chart"
setint(1):print\s$\:copy f$:setint("")
print"Press Return.... ";:get f$:print chr$(8)\:goto computer
Status
print\\" status report"\:x$="":if kt>1 x$="s"
print" klingon"x$" remaining: "kt
x=(clock(2)-clock(1))/60:x$=right$("0"+str$(x),2)+" minutes"
print" time remaining: "x$:x$="":if b9>1 x$="s"
print" starbase"x$" remaining: "b9\\:goto computer
Show.file
on nocar goto termin
f$=dx$+"star.instr"
setint(1):print\s$\:open #1,f$:if mark(1) close #1:link dx$+"star","commands"
Showfl2
copy (20) #1
if (eof(1) or key(1)) setint(""):close #1:link dx$+"star","commands"
if not flag(35) goto showfl2
print "press [return] ";:get i$:if i$=chr$(13) print " ";
print chr$(8,16);chr$(32,16);chr$(8,16);
if i$=" " setint(""):close #1:link dx$+"star","commands"
setint(1):goto showfl2
Termin
linkdx$+"star.logon","termin"
; EOF